package com.lyf.service;

import java.util.List;

import com.lyf.dao.GoalDao;
import com.lyf.pojo.Goal;

public class GoalService {

	private GoalDao dao;

	//set,
	public void setDao(GoalDao dao) {
		this.dao = dao;
	}
	
	
	//method
	public void save(Goal g){
		dao.saveOrUpdate(g);
	}
	
	public List<Goal> findByProjectId(String id){
		return dao.findByProjectId(id);
	}
	
	public Goal findByGoalId(String id){
		return dao.get(id);
	}


	public void delete(String id) {
		dao.delete(id);
	}
	
}
